#include <iostream>
using namespace std;

int main(){
    int n;
    cin >> n;
    if(n > 1 && n < 1000000){
        int temp = n;
        int sum = 0;
        int t[1000000] = {0};
        for(int i = 2;i < n;i++){
            if(temp % i == 0){
                t[i]++;
                cout << i << "\t";
            }
        }
        for(int i = 0;i < 1000000;i++){
            sum += t[i];
        }
        cout << sum;
    }
    return 0;
}